<!DOCTYPE html>
<html lang="en" dir="ltr">
    <head>
        <meta charset="utf-8">
        <title>QR生成器</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <style media="screen">
            body{
                padding: 40px;
            }
        </style>
    </head>
    <body>
        <div class="">
            <ul>
                <li> <a href="barcode.html">条形码生成器</a> </li>
                <li> <span id="str"></span> </li>
            </ul>
        </div>
        <div class="">
            <div id="code"></div>
        </div>
    </body>
    <script type="text/javascript" src="//mirror.fe80.cn/jquery/3.6.1/jquery.min.js"></script>
    <script type="text/javascript" src="jquery.qrcode.min.js"></script>
    <script type="text/javascript" src="wii.js"></script>
    <script type="text/javascript">
        function utf16to8(str) {
            var out, i, len, c;
            out = "";
            len = str.length;
            for (i = 0; i < len; i++) {
                c = str.charCodeAt(i);
                if ((c >= 0x0001) && (c <= 0x007F)) {
                    out += str.charAt(i);
                } else if (c > 0x07FF) {
                    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                    out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                } else {
                    out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                }
            }
            return out;
        }
        var ccc = '';
        ccc = 'https://i.fe80.cn/q/i4.html';
        ccc = 'https://linzening.github.io';
        console.log(wii.qrcodeMaker());
        $('#str').text(wii.qrcodeMaker());
        $("#code").qrcode({
            // render: "canvas", //table方式
            width:200, //宽度
            height:200, //高度
            text: ccc//任意内容
        });
    </script>
</html>
